<#include "../common/_layout.html" />
<@layout>
    <form class="form-horizontal" action="problem/save" method="post">
        <div class="control-group problem <#if titleMsg??>error</#if>">
            <label class="control-label" for="inputTitle">Title</label>
            <div class="controls">
                <textarea id="inputTitle" name="problem.title" rows="1" cols="120" required></textarea>
                <p class="text-error">${titleMsg!}</p>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputTimeLimit">Time Limit</label>
            <div class="controls input-append">
                <input class="input-mini" type="number" id="inputTimeLimit" name="problem.time_limit" value="1000" required>
                <span class="add-on">MS</span>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputMemoryLimit">Memory Limit</label>
            <div class="controls input-append">
                <input class="input-mini" type="number" id="inputMemoryLimit" name="problem.memory_limit" value="65536" required>
                <span class="add-on">KB</span>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputDescription">Description</label>
            <div class="controls">
                <textarea id="inputDescription" name="problem.description" rows="13" cols="120"></textarea>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputInput">Input</label>
            <div class="controls">
                <textarea id="inputInput" name="problem.input" rows="9" cols="120"></textarea>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputOutput">Output</label>
            <div class="controls">
                <textarea id="inputOutput" name="problem.output" rows="9" cols="120"></textarea>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputSampleInput">Sample Input</label>
            <div class="controls">
                <textarea id="inputSampleInput" name="problem.sample_input" rows="9" cols="120"></textarea>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputOutput">Sample Output</label>
            <div class="controls">
                <textarea id="inputSampleOutput" name="problem.sample_output" rows="9" cols="120"></textarea>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputHint">Hint</label>
            <div class="controls">
                <textarea id="inputHint" name="problem.hint" rows="5" cols="120"></textarea>
            </div>
        </div>
        <div class="control-group problem">
            <label class="control-label" for="inputSource">Source</label>
            <div class="controls">
                <textarea id="inputSource" name="problem.source" rows="1" cols="120"></textarea>
            </div>
        </div>
        <div class="control-group">
            <div class="controls">
                <label class="checkbox">
                <input type="checkbox" name="problem.status" value="true" checked>Active
                </label>
                <button type="submit" class="btn btn-primary">Submit</button>
                <button type="reset" class="btn btn-info">Reset</button>
            </div>
        </div>
    </form>
</@layout>